<?php $this->load->view('config/header');?>
<h1>List Content <small>form entry</small></h1>
<ol class="breadcrumb">
  <li><a href="<?php echo site_url()?>home"><i class="icon-dashboard"></i> Dashboard</a></li>
  <li><a href="<?php echo site_url()?>listcontent"><i class="icon-th-list"></i> List Content</a></li>
  <li class="active"><i class="icon-file-alt"></i> Form <?php echo $mode; ?></li>
</ol>

<form class="form-horizontal" role="form" method="post" action="<?php echo site_url() ?>listcontent/<?php echo $action; ?>">
	<input type="hidden" class="form-control" name="id_list" value="<?php echo @$detail[0]['id_list']?>">
	<input type="hidden" class="form-control" name="date_list" value="<?php echo @$detail[0]['date_list']?>">
	<div class="form-group">
		<label for="id_submenu" class="col-lg-2 control-label">Menu</label>
		<div class="col-lg-6">
			<select class="form-control" name="id_submenu">
				<?php if (@$submenu):?>
					<?php foreach ($submenu as $row):?>
						<?php if ($row['id_submenu'] == @$detail[0]['id_submenu']):?>
							<?php $selected =  'selected="selected"' ?>
						<?php else :?>
							<?php $selected =  '' ?>
						<?php endif;?>
						<option value="<?php echo $row['id_submenu'] ?>" <?php echo $selected ?> ><?php echo $row['nama_submenu'] ?></option>
					<?php endforeach?>
				<?php else :?>	
					<option value="">Belum ada Menu</option>
				<?php endif?>
			</select>
		</div>
	</div>
	<div class="form-group">
		<label for="title_list" class="col-lg-2 control-label">Name listcontent</label>
		<div class="col-lg-6">
			<input type="text" class="form-control" name="title_list" value="<?php echo @$detail[0]['title_list']?>" >
		</div>
	</div>
	<div class="form-group">
		<label for="enable_list" class="col-lg-2 control-label">Enable</label>
		<div class="col-lg-2">
			<?php $selected1 =  ''; ?>
			<?php $selected2 =  ''; ?>
			<select class="form-control" name="enable_list">
				<?php if (@$detail[0]['enable_list'] == 1):?>
					<?php $selected1 =  'selected="selected"' ?>
				<?php elseif (@$detail[0]['enable_list'] == 0):?>
					<?php $selected2 =  'selected="selected"' ?>
				<?php else :?>
					<?php $selected1 =  ''; ?>
					<?php $selected2 =  ''; ?>
				<?php endif;?>
				<option value="1" <?php echo $selected1; ?> >Aktif</option>
				<option value="0" <?php echo $selected2; ?> >Non Aktif</option>
			</select>
		</div>
	</div>
	<div class="form-group">
		<div class="col-lg-offset-2 col-lg-10">
			<input type="submit" name="submit" value="Simpan" class="btn btn-primary"/>
			<a href="<?php echo site_url()?>listcontent" class="btn btn-primary">Batal</a>
		</div>
	</div>
</form>

<?php $this->load->view('config/footer');?>